/*
 *  Distortion.h
 *  
 *
 *  Created by Thomas Fu on 6/9/11.
 *  Copyright 2011 __MyCompanyName__. All rights reserved.
 *
 */
#ifndef _Distortion_h
#define _Distortion_h

#include "FastNN.h"
#include "LinearModule.h"

FastNN *DistortionFastNN()
{
	FastNN *nn = (FastNN*)malloc(sizeof(FastNN));
	nn->numInputs = 1;
	nn->numOutputs = 1;
	nn->numHidden = 2;
	initializeFastNN(nn);
	
	nn->inputToHidden1Weights[0] = -11.8377;
	nn->inputToHidden1Weights[1] = 6.06345;
	nn->inputToHidden1Weights[2] = -4.78595;
	nn->inputToHidden1Weights[3] = 2.45547;
	nn->hidden1ToHidden2Weights[0] = 1.59618;
	nn->hidden1ToHidden2Weights[1] = -3.78202;
	nn->hidden1ToHidden2Weights[2] = 0.917078;
	nn->hidden1ToHidden2Weights[3] = -9.32589;
	nn->hidden1ToHidden2Weights[4] = -3.67016;
	nn->hidden1ToHidden2Weights[5] = 6.86679;
	nn->hidden2ToOutputWeights[0] = 3.96768;
	nn->hidden2ToOutputWeights[1] = 4.55429;
	nn->hidden2ToOutputWeights[2] = -4.07673;
	
	
	return nn;
}

LinearModule *HPFilter()
{
	LinearModule *filter = (LinearModule*)malloc(sizeof(LinearModule));
	filter->order = 2;
	initializeLinearModule(filter);
	filter->inputWeights[0] = 0.951225884695807;
	filter->inputWeights[1] = -0.951225884695807;
	filter->outputWeights[0] = 1.0;
	filter->outputWeights[1] = -0.902451769391614;
	return filter;
}

LinearModule *LPFilter()
{
	LinearModule *filter = (LinearModule*)malloc(sizeof(LinearModule));
	filter->order = 2;
	initializeLinearModule(filter);
	filter->inputWeights[0] = 0.048994916216693;
	filter->inputWeights[1] = 0.048994916216693;
	filter->outputWeights[0] = 1.0;
	filter->outputWeights[1] = -0.902010167566615;
	return filter;
}

LinearModule *ShelvingFilter()
{
	LinearModule *filter = (LinearModule*)malloc(sizeof(LinearModule));
	filter->order = 3;
	initializeLinearModule(filter);
	filter->inputWeights[0] = 2.44559;
	filter->inputWeights[1] = -4.66735;
	filter->inputWeights[2] = 2.23156;
	filter->outputWeights[0] = 1.0;
	filter->outputWeights[1] = -1.85515;
	filter->outputWeights[2] = 0.864959;
	return filter;
}

#endif